<template>
    <div class="box">
        <div v-if="PLANTFORM == 'SP'">
            <div class="title" @click="GotoUrl(0)">工贸企业</div>
            <div class="title" @click="GotoUrl(1)">危化企业</div>
            <div class="title" @click="GotoUrl(3)">其他行业</div>

        </div>
        <div v-else>
            <div class="title" @click="GotoUrl(1)">码上学</div>

        </div>
    </div>
</template>
<script>
export default {
    name: 'name',
    PLANTFORM:process.env.VUE_APP_PLANTFORM,
    created() {
        this.PLANTFORM=process.env.VUE_APP_PLANTFORM
        // window.open("http://qtyj.zatsafety.com/h5/#/codestu", "_self")
    },
    methods: {
        GotoUrl(type) {
            // if(type==1){
            // // 码上学  http://qtbmapp.zatsafety.com/#/       
            //     //  window.location.href="https://qtbmapp.zatsafety.com/#/"
            // }
            // if(type==2){
            //     var host = window.location.host
            //     if(host.indexOf('chs')!=-1){
            //         this.$router.push('/chsReport/Detail')
            //     }else{
            //         // this.$router.push('/qtyjReport/Detail')

            //     }
            //     // 码上报  http://qtyj.safetyhua.com/h5/#/qtyjReport/Detail
            // }

            if(this.PLANTFORM=='SP'){
                this.$router.push({path:'/qtyjReport/StudyFirst', query : { codetype:type ,n:''}})
            } else{
                this.$router.push({path:'/qtyjReport/StudyFirst', query : { type }})
            }
            
        }
    },

}
</script>

<style>
.box {

    margin: 15px;
    padding: 15px 10px;
    box-shadow: rgb(0 0 0 / 8%) 0px 0px 3px 1px;
    border: 1px solid #ebeef5;
    border-radius: 4px;
    overflow: hidden;
    font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
    background-color: #fff;
    flex: 1;
    height: 90%;
}

.title {
    width: 90%;
    height: 60px;
    font-size: 20px;
    color: #6a6a6a;
    line-height: 60px;
    text-align: center;
    margin: 0 auto;
    border-radius: 5px;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    color: #000;
    background-color: #f8f8f8;
    cursor: pointer;
    margin-top: 10px;

}
</style>